# 经典得分函数

class getS:
    def __init__(self, IVq, q):

        self.data = IVq
        self.q = q
        self.list_function = [self.s]

    def getScore(self, numb=0):
        try:
            return self.list_function[numb]()
        except:
            print("下标索引的距离公式不存在")
            return self.list_function[0]()

    def s(self):

        a = self.data[0][0] ** self.q
        b = self.data[0][1] ** self.q
        c = self.data[1][0] ** self.q
        d = self.data[1][1] ** self.q

        return (a + b - c - d) / 2


if __name__ == '__main__':
    example=getS(([0.35428, 0.45428], [0.54572, 0.64572]),3).getScore()
    print(example)